<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript">
	function choose() {
		var all = document.getElementById("all").checked;
		var choose = document.getElementsByName("inform");
		if (all == true) {
			for (i = 0; i <= choose.length; i++) {
				choose[i].checked = "checked";
			}
		}
		if (all == false) {
			for (i = 0; i <= choose.length; i++) {
				choose[i].checked = false;
			}
		}
	}
</script>

<style>
#menu {
width:800px;
height:30px;
margin:0 auto;
}
th,td{
 text-align: center;"
}

</style>


<div class="breadcrumbs" id="breadcrumbs">
	<script type="text/javascript">
		try {
			ace.settings.check('breadcrumbs', 'fixed')
		} catch (e) {}
	</script>

	<ul class="breadcrumb">
		<li><i class="icon-home home-icon"></i> <a href="../../../index.jsp">首页</a>
		</li>

		<li>菜单管理</li>
		<li class="active">菜单列表</li>
	</ul>
	<!-- .breadcrumb -->

	
</div>


<div class="page-content">
	<div class="page-header">
		<h1>
			菜单列表
		</h1>
	</div>
	<!-- /.page-header -->

	<div class="row">
		<div class="col-xs-12">
			<!-- PAGE CONTENT BEGINS -->

			<div class="row">
				<div class="col-xs-12">
				<form action="" name="open" method="post"> 
					<div class="table-responsive">
							<div  id="menu"  class="btn-group affix-top" data-spy="affix" data-offset-top="100">
						        <div class="btn-group">
						                <button class="btn btn-danger" type="submit" 
						                onclick="open.action='./delete_auth';return confirm('确认删除吗？');open.submit();">
												删除<i class="icon-trash bigger-120"></i>
											</button>
						            </div>
						        <div class="btn-group">
						                <button data-toggle="dropdown" class="btn btn-success">
													状态
													<i class="icon-angle-down icon-on-right"></i>
												</button>
						                <ul class="dropdown-menu" style="max-height:300px;overflow: auto;">
						                    <li><a href="javascript:;" data-value="true" data-type="enabled">启用</a></li>
						                    <li><a href="javascript:;" data-value="false" data-type="enabled">锁定</a></li>
						                    </ul>
						            </div>
						        </div>
						        
							<div class="space-4"></div>
						<table id="sample-table-1"
							class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th class="center" style="width: 70px;">
									   <label> 
									       <input type="checkbox"  id="all" onclick="choose()" style="width: 16px; height: 18px; "/> 
									        
									   </label>
									</th>
									<th style="width: 100px;">编号ID</th>
									<th>菜单名</th>
									<th>菜单路径URL</th>
									<th style="width: 130px;">是否导航结点</th>
									<th>状态</th>
									<th>图标样式</th>
									<th>菜单描述</th>
								</tr>
							</thead>
                           
                           <!-- target="_blank" ：打开一个新的标签-->
							<tbody>
							<c:forEach items="${page.lists}" var="opp">
								<tr>
									<td class="center">
									   <label> 
									      <input type="checkbox" name="inform"
													style="width: 16px; height: 18px; " name="inform" value="${opp.authId}"  />
											</label>
									</td>
									<td><a href="getAuthById?authId=${opp.authId}"   title="点击ID进入编辑页">${opp.authId}</a></td>
									<td>${opp.authName}</td>
									<td>${opp.authPath}</td>
									<td>
									   <c:if test="${opp.parentId==2}"><span class="label label-sm label-warning">否</span></c:if>
									   <c:if test="${opp.parentId==1}"><span class="label label-sm label-success">是</span></c:if>
									</td>
									<td>
									   <c:if test="${opp.state=='锁定'}"><span class="label label-sm label-inverse arrowed-in">锁定</span></c:if>
									   <c:if test="${opp.state=='启用'}"><span class="label label-sm label-info arrowed arrowed-righ">启用</span></c:if>
									</td>
									<td>${opp.iconCls}</td>
									<td>
									   ${opp.authDescription}
									</td>
								</tr>
						        </c:forEach>
							</tbody>
						</table>
						        <div class="meneame" style="margin-left: 38%;">${page.html}</div>
						        
					    <div class="alert alert-success alert-dismissible mt10" role="alert">
							    <button type="button" class="close" data-dismiss="alert">
							        <span aria-hidden="true">×</span><span class="sr-only">Close</span>
							    </button>
							    <ul>
							        <li>删除：勾选选择框，点击删除即删除该条信息（勾线多个，可多条删除）。</li>
							        <li>状态：选择属性"启用"（或"否"）前，先勾选一个，则单条修改状态（或勾选多个则多个一起修改）。</li>
							        <li>编号ID：点击编号ID既可以编辑该条信息。</li>
							        <li>排序：用户列表信息都是按照倒叙，从新创建往后依次排序。</li> 
							    </ul>
						</div>
						
					</div>
					</form>
					<!-- /.table-responsive -->
				</div>
				<!-- /span -->
			</div>
			<!-- /row -->
		</div>
		<!-- /.col -->
		
	</div>
	<!-- /.row -->
	
</div>
<!-- /.page-content -->


